Skip to content

fix: Support attributes using builtin type names #360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

dblanchette
Copy link
Contributor

Fixes #359

@dblanchette
Copy link
Contributor Author

I'm not too sure about the end-to-end failures. It is saying this on my machine:

end_to_end_tests\test_end_to_end.py FF                                                                                                                                                               [100%]

================================================================================================ FAILURES =================================================================================================
_____________________________________________________________________________________________ test_end_to_end _____________________________________________________________________________________________
end_to_end_tests\golden-record and my-test-api-client had differing files: {'pyproject.toml', '.gitignore', 'README.md'}, and errors []
__________________________________________________________________________________________ test_custom_templates __________________________________________________________________________________________
end_to_end_tests\golden-record and my-test-api-client had differing files: {'pyproject.toml', '.gitignore'}, and errors []
========================================================================================= short test summary info =========================================================================================
FAILED end_to_end_tests/test_end_to_end.py::test_end_to_end
FAILED end_to_end_tests/test_end_to_end.py::test_custom_templates
============================================================================================ 2 failed in 7.68s ============================================================================================

@dbanty
Copy link
Collaborator

dbanty commented Mar 23, 2021

Interesting, I guess we had a reserved word being used somewhere in our end to end tests? If you do poetry shell then task re it will regenerate the end-to-end record and run the tests. Then you can check the diff to see what changed and make sure it's not something unexpected.

@dblanchette
Copy link
Contributor Author

I think that was it, there was an attribute named type.

Isn't it a breaking change that it's now called type_?

@codecov
Copy link

codecov bot commented Mar 23, 2021

Codecov Report

Merging #360 (c0078e0) into main (17daa73) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #360   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           47        47           
  Lines         1420      1421    +1     
=========================================
+ Hits          1420      1421    +1     
Impacted Files Coverage Δ
openapi_python_client/utils.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 17daa73...c0078e0. Read the comment docs.

@dbanty
Copy link
Collaborator

dbanty commented Mar 23, 2021

Hmm, I think I consider it a bug that we allowed reserved words in the first place... but yeah, it could potentially modify people's clients in unexpected ways so we should consider it breaking.

@dbanty dbanty added this to the 0.9.0 milestone Mar 23, 2021
@dblanchette
Copy link
Contributor Author

Thanks a lot for the quick replies, it's appreciated.

@dbanty dbanty merged commit dc05117 into openapi-generators:main Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typing error in generated client when response attribute use reserved keywords
2 participants